Fix potential NPE in ApiCallAttemptTimeoutTrackingStage#6332
Fix potential NPE in ApiCallAttemptTimeoutTrackingStage#6332
Conversation
…age when exception is thrown before the tracker can be set in the context
zoewangg
left a comment
There was a problem hiding this comment.
This seems to only fix the symptom, not the root cause, can we create a task to fix the root cause?
There is always a risk of this happening, I believe the root cause is when the timeout task is rejected by the |
|
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |



fix potential NullPointerException in ApiCallAttemptTimeoutTrackingStage when exception is thrown before the tracker can be set in the context
Motivation and Context
Customer reported NPE because the call to
context.apiCallAttemptTimeoutTracker()returns null. There is some code that could throw an exception before thetimeoutTrackeris set on the context, particularly if theScheduledExecutorServicerejects the scheduled task for some reason.Modifications
Added null check
Testing
ran unit tests